abstract class Person {
  abstract get name(): string;
  abstract set name(value: string);

  abstract sayHello(message: string): void;
}

class Student extends Person {
  private _name: string;

  constructor(name: string) {
    super();
    this._name = name;
  }

  get name(): string {
    return this._name;
  }

  set name(value: string) {
    this._name = value;
  }

  sayHello(message: string): void {
    console.log(message);
  }
}

const zhangsan = new Student("张三");
zhangsan.sayHello("你好");
console.log(zhangsan.name);
zhangsan.name = "zhangsan";
console.log(zhangsan.name);